home *** CD-ROM | disk | FTP | other *** search
- on deflateMe
- set lsSparedList to value(field "spared list")
- put lsSparedList
- if not listp(lsSparedList) then
- alert("Sorry, there was an error creating the spared list")
- exit
- else
- put "<i> spared list created with " & count(lsSparedList) & " members."
- end if
- set howManyMembers to the number of castMembers
- put "<i> howManyMembers = " & howManyMembers
- set the itemDelimiter to ":"
- repeat with cNum = 1 to howManyMembers
- if the mouseDown then
- exit
- end if
- if the castType of cast cNum = #bitmap then
- set myLinkName to the last item in the fileName of cast cNum
- put myLinkName
- if (getPos(lsSparedList, myLinkName) = 0) and (myLinkName <> EMPTY) then
- put " " & cNum & " is a goner..."
- erase(cast cNum)
- next repeat
- end if
- put "sparing cast " & cNum & ": " & the name of cast cNum
- end if
- end repeat
- set the itemDelimiter to ","
- set oldFileName to the movieName
- set newFileName to "tiny " & oldFileName
- put "<i> saving as " & newFileName
- saveMovie(newFileName)
- end
-
- on generateSparedList
- set temp to FileIO(mnew, "?read", "PICT")
- put temp
- if not objectp(temp) then
- alert("Sorry, error finding file: " & FileIO(mError, temp))
- exit
- end if
- set targetPath to temp(mFileName)
- put targetPath
- set oldDelim to the itemDelimiter
- set the itemDelimiter to ":"
- delete char -30002 of targetPath
- put "trimmed targetPath ="
- put targetPath
- set the itemDelimiter to oldDelim
- temp(mdispose)
- set sparedList to []
- repeat with fNum = 1 to the maxinteger
- set fName to getNthFileNameInFolder(targetPath, fNum)
- if fName = EMPTY then
- exit repeat
- end if
- append(sparedList, fName)
- end repeat
- return sparedList
- end
-